/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>
#import "OFXDocument.h"
#import "OFXSignOnMessageSet.h"

#define DEFAULT_DOCUMENT_LENGTH 1000

@interface OFXDocumentRequest : OFXDocument {
  OFXSignOnMessageSet* signOnRequest;
  NSMutableArray* messageSets;
}

/**
 * @property messageSets
 * @brief Array of message sets to include in document.
 */
@property(retain) NSMutableArray* messageSets;

/**
 * @property signOnRequest
 * @brief The sign on request object
 */
@property(retain) OFXSignOnMessageSet* signOnRequest;

/**
 * Initialize document with specified version and default values for all
 * other header elements.  
 *
 * Default values:
 * - Security: NONE
 * - Encoding: USASCII
 * - Charset: 1252
 * - Compression: NONE
 * - Old file UID: NONE
 * - New file UID: A document UUID
 *
 * @params ofxVersion Version of OFX document that should be used when
 * serializing.  Valid values include: 100, 101, 102, 103, 106, 200, 201, 211
 *
 * @returns A newly initialized OFX document
 */
- (id)initWithVersion:(NSString *)requestOfxVersion;

/**
 * Create an OFX 1.x/2.x compliant request document.  Serialization depends
 * on the version in the header.
 *
 * @returns An NSString* object with an OFX 1.x request document.
 */
- (NSString*)asString;

@end
